//horribly inefficent apparently
var bottom = argument0;
var top = argument1;
var structuringElement = instance_create(0, 0, obj_Module);
var diameter = argument2;

for(var yyy = 0; yyy < diameter; yyy++)
{
    for(var xxx = 0; xxx < diameter; xxx++)
    {
        var tile = 0;
        tile = instance_create(0, 0, obj_Tile);
        setTile(xxx, yyy, tile, structuringElement);
    }
}
//dilate module takes waaaay too long to execute
var dilated = dilateModule(top, structuringElement)
var test = absCheckOverlap(bottom, dilated);
with(structuringElement)
{
    instance_destroy();
}
with(dilated)
{
    instance_destroy();
}
return test;

